package com.gpjcjl.entity;

import android.os.Parcel;
import android.os.Parcelable;

import androidx.annotation.NonNull;
import androidx.room.Entity;
import androidx.room.Ignore;
import androidx.room.PrimaryKey;

/**
 * 原始记录详情（钢瓶列表）
 *
 * @author yinbiao
 */
@Entity
public class RecordDetail implements Parcelable {

    private String check_num;//2", ##检测编号
    private String produce;//鞍山高压容器厂", ##气瓶制造单位
    private String produce_time;//1990-03-04", ##生产日期
    private String num;//ex123456", ##钢瓶编号
    private String around;//2.5", ##内外表面
    private String wall;//3", ##壁厚(mm)
    private String weight;//", ##重量(kg)
    private String bottle;//合格", ##瓶阀及附件检验
    private String water_gage;//合格", ##水压试验
    private String airtight;//合格", ##气密试验
    private String epilog;//", ##检验结论
    private String scrap;//" ##报废原因
    private String qrCode;//二维码编号
    @Ignore
    private String number;//二维码编号

    @PrimaryKey
    @NonNull
    private String id;//钢瓶记录id
    private String rid;//原始记录id

    public RecordDetail() {
    }

    public String getCheck_num() {
        return check_num;
    }

    public void setCheck_num(String check_num) {
        this.check_num = check_num;
    }

    public String getProduce() {
        return produce;
    }

    public void setProduce(String produce) {
        this.produce = produce;
    }

    public String getProduce_time() {
        return produce_time;
    }

    public void setProduce_time(String produce_time) {
        this.produce_time = produce_time;
    }

    public String getNum() {
        return num;
    }

    public void setNum(String num) {
        this.num = num;
    }

    public String getAround() {
        return around;
    }

    public void setAround(String around) {
        this.around = around;
    }

    public String getWall() {
        return wall;
    }

    public void setWall(String wall) {
        this.wall = wall;
    }

    public String getWeight() {
        return weight;
    }

    public void setWeight(String weight) {
        this.weight = weight;
    }

    public String getBottle() {
        return bottle;
    }

    public void setBottle(String bottle) {
        this.bottle = bottle;
    }

    public String getWater_gage() {
        return water_gage;
    }

    public void setWater_gage(String water_gage) {
        this.water_gage = water_gage;
    }

    public String getAirtight() {
        return airtight;
    }

    public void setAirtight(String airtight) {
        this.airtight = airtight;
    }

    public String getEpilog() {
        return epilog;
    }

    public void setEpilog(String epilog) {
        this.epilog = epilog;
    }

    public String getScrap() {
        return scrap;
    }

    public void setScrap(String scrap) {
        this.scrap = scrap;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getRid() {
        return rid;
    }

    public void setRid(String rid) {
        this.rid = rid;
    }

    public String getQrCode() {
        return qrCode;
    }

    public void setQrCode(String qrCode) {
        this.qrCode = qrCode;
    }

    @Override
    public int describeContents() { return 0; }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.check_num);
        dest.writeString(this.produce);
        dest.writeString(this.produce_time);
        dest.writeString(this.num);
        dest.writeString(this.around);
        dest.writeString(this.wall);
        dest.writeString(this.weight);
        dest.writeString(this.bottle);
        dest.writeString(this.water_gage);
        dest.writeString(this.airtight);
        dest.writeString(this.epilog);
        dest.writeString(this.scrap);
        dest.writeString(this.qrCode);
        dest.writeString(this.number);
        dest.writeString(this.id);
        dest.writeString(this.rid);
    }

    protected RecordDetail(Parcel in) {
        this.check_num = in.readString();
        this.produce = in.readString();
        this.produce_time = in.readString();
        this.num = in.readString();
        this.around = in.readString();
        this.wall = in.readString();
        this.weight = in.readString();
        this.bottle = in.readString();
        this.water_gage = in.readString();
        this.airtight = in.readString();
        this.epilog = in.readString();
        this.scrap = in.readString();
        this.qrCode = in.readString();
        this.number = in.readString();
        this.id = in.readString();
        this.rid = in.readString();
    }

    public static final Creator<RecordDetail> CREATOR = new Creator<RecordDetail>() {
        @Override
        public RecordDetail createFromParcel(Parcel source) {return new RecordDetail(source);}

        @Override
        public RecordDetail[] newArray(int size) {return new RecordDetail[size];}
    };

    public String getNumber() {
        return number;
    }

    public void setNumber(String number) {
        this.number = number;
    }


}
